﻿using RAP.Framework.Libary.ServerCacheManager;
using RAP.Framework.Libary.DomTemplateBuilder.Handler.Conditional;
using RAP.Framework.Libary.DomTemplateBuilder.Interface;

namespace RAP.Framework.Libary.DomTemplateBuilder.Handler.Cache
{
	/// <summary>
	/// 检测指定key的缓存是否存在
	/// </summary>
	public class IsContainsCacheHandler : ConditionalHandler
    {
        protected override bool DoCompareValue( object propertyValue, object rootParamObject, object parentParamObject, ITemplateRenderContext context )
        {
            return CacheManager.Instance.Contains( propertyValue.ToString( ) );
        }

    }
}
